CREATE TABLE [dbo].[App_costo]
(
[id_costo] [dbo].[_codigo] NOT NULL,
[id_entidad] [dbo].[_codigo] NOT NULL,
[descripcion] [dbo].[_nombre] NOT NULL,
[valor] [dbo].[_importe] NULL,
[porcentaje] [dbo].[_importe] NULL,
[signo] [dbo].[_lista] NULL,
[orden_aplica] [dbo].[_importe] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_costo] ADD CONSTRAINT [PK_costo] PRIMARY KEY CLUSTERED  ([id_costo]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[App_costo] ADD CONSTRAINT [FK_App_costo_App_entidad] FOREIGN KEY ([id_entidad]) REFERENCES [dbo].[App_entidad] ([id_entidad])
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[App_costo].[valor]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[App_costo].[porcentaje]'
GO
EXEC sp_bindefault N'[dbo].[cero]', N'[dbo].[App_costo].[orden_aplica]'
GO
